package com.bw.product.server.service.impl;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ThreadPoolExecutor;

import com.bw.product.common.domain.PmsSkuImages;
import com.bw.product.common.domain.PmsSkuInfo;
import com.bw.product.common.domain.PmsSpuInfoDesc;
import com.bw.product.server.mapper.*;
import com.bw.product.server.service.IPmsSkuInfoService;
import com.bw.product.server.vo.AttrGroupVo;
import com.bw.product.server.vo.ItemInfoVo;
import com.bw.product.server.vo.SaleAttrVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * sku信息Service业务层处理
 * 
 * @author bw
 * @date 2024-12-22
 */
@Service
public class PmsSkuInfoServiceImpl implements IPmsSkuInfoService
{
    @Autowired
    private PmsSkuInfoMapper pmsSkuInfoMapper;
    @Autowired
    private PmsAttrGroupMapper pmsAttrGroupMapper;
    @Autowired
    private PmsSkuSaleAttrValueMapper pmsSkuSaleAttrValueMapper;
    @Autowired
    private PmsSkuImagesMapper pmsSkuImagesMapper;
    @Autowired
    private PmsSpuInfoDescMapper pmsSpuInfoDescMapper;
    @Autowired
    private ThreadPoolExecutor itemThreadPoolExcuter;

    /**
     * 查询sku信息
     * 
     * @param skuId sku信息主键
     * @return sku信息
     */
    @Override
    public PmsSkuInfo selectPmsSkuInfoBySkuId(Long skuId)
    {
        return pmsSkuInfoMapper.selectPmsSkuInfoBySkuId(skuId);
    }

    /**
     * 查询sku信息列表
     * 
     * @param pmsSkuInfo sku信息
     * @return sku信息
     */
    @Override
    public List<PmsSkuInfo> selectPmsSkuInfoList(PmsSkuInfo pmsSkuInfo)
    {
        return pmsSkuInfoMapper.selectPmsSkuInfoList(pmsSkuInfo);
    }

    /**
     * 新增sku信息
     * 
     * @param pmsSkuInfo sku信息
     * @return 结果
     */
    @Override
    public int insertPmsSkuInfo(PmsSkuInfo pmsSkuInfo)
    {
        return pmsSkuInfoMapper.insertPmsSkuInfo(pmsSkuInfo);
    }

    /**
     * 修改sku信息
     * 
     * @param pmsSkuInfo sku信息
     * @return 结果
     */
    @Override
    public int updatePmsSkuInfo(PmsSkuInfo pmsSkuInfo)
    {
        return pmsSkuInfoMapper.updatePmsSkuInfo(pmsSkuInfo);
    }

    /**
     * 批量删除sku信息
     * 
     * @param skuIds 需要删除的sku信息主键
     * @return 结果
     */
    @Override
    public int deletePmsSkuInfoBySkuIds(Long[] skuIds)
    {
        return pmsSkuInfoMapper.deletePmsSkuInfoBySkuIds(skuIds);
    }

    /**
     * 删除sku信息信息
     * 
     * @param skuId sku信息主键
     * @return 结果
     */
    @Override
    public int deletePmsSkuInfoBySkuId(Long skuId)
    {
        return pmsSkuInfoMapper.deletePmsSkuInfoBySkuId(skuId);
    }

}
